Control system and method for limiting power demand of an industrial plant

ABSTRACT

The invention relates in general to control of the consumption of energy derived by an industrial user from a power supply system (electrical, gas or like commodity), and more particularly to a control system for adjusting an industrial load system to limit the demand of power while respecting the constraints of the load system.

United States Patent 3,872,286 Putman Mar. 18, 1975 CONTROL SYSTEM AND METHOD FOR 3,505,508 Leyde 235/1512] X LIMITING POWER DEMAND OF AN INDUSTRIAL PLANT 3I655Z114 Polenz et a1. 1. 235/1512! x [75] Inventor; Richard E. J, Putman, Pittsburgh, 3.719.809 3/1973 Fink 235/151.21

[73] Assignee: Westinghouse Electric Corporation, 'f 'l Exmli'fep'Eugene 1 Pittsburgh p ASSISIUIH E.\'ammerEdwnrd J. Wise [22] F1 d 0 t 12 1973 Attorney, Agent, or Firm-C. M. Lorin I e c The invention relates in general to control of the c0nsumption of energy derived by em industrial user from Fi i zss/lslzl. l a po wer supply system (electrical, gas or like come 444 modtty), and more particularly to a control system for 0 I H adjusting an industrial loud system to limit the demand f h'l t 1 References Cited gystrgmer w Ie respec mg the constraints of the 04d UNITED STATES PATENTS 1/1967 Williams 235/15l.2l x 3 Drawmg F'gures POWER uni: ,3

. I l l I RESET 1 j I I -|7 A5 POWER COMPANY i r i i I METER W e s s CLOCK "-1 KwH I I II m m PLANT INHlBlTED CRITICAL SHEDDABLE BASE g LOADS LOADS LOADS LOADS 4av J (CONTROL SYSTE M I: l

k CONTACT 5 8 INTERRUPT VUNIT OUTPUT J I; UNIT 7 PROCESS I CONTROL COMPUTER 4s v 1 SYSTEM SOURCE 1 l 2o TELETYPE DEVICE V19 4av FIG.6

FIG?

3.872.286 sum '03UF 12 THIRD FIELD max SECOND FIELD RTENTEU MAR I 81975 DEMAND LIMIT FIRST FIELD KwH PATEHTED 3,872,286

" SHEET mar 12 BASE +HSHEDDABLE LOADS ON Y 1% DEMAND 7 r LIMIT SHEDDABLE LOAD ON FIRST jiSE LOAD ON I5M| NUTES A ,6 a A T ,u

BASE R LOAD B P S 0 F|G.9

MEAN

fie LOAD D K ,fl A I I 1% J L |5M|NUTES PATENTEU MAR I 8 I975 3.872.286 SHEET U5UF12 KWH REDUCED DEMAND T LIMIT I I I I I I l l I I A I I 0 "c 11, I5 MINUT I FIG. lO

PATENTEBHAR I 81975 SHEET 07 0F 1 2 KmJDQMIOw xwE. OP ZmPrmm 5 52% EEEE 330% 1 CONTROL SYSTEM ANDMETll-IOD FOR LIMITING POWER DEMAND OF AN INDUSTRIAL PLANT BACKGROUND OF THE INVENTION When a load is connected by an industrial customer on a power system the cost of the energy consumed is generally billed by the power supply company on the basis of the total amount of power having flow within a billing period. The more power that is used, the more is the cost to the customer, and a cost-conscious customer, provided he has the choice, will at times cut the total load or at least reduce it. When a plurality of interruptible loads are connected on the power system, the final cost will depend on the overall distribution of the active loads. ltis important for the customer or user to decide what the distribution of the loads should be within a given demand period, as well as between respective demand periods, and for the purpose to selectively control the load distribution. Such decision making is particularly important with electrical loads in view of the practice by the power supply utility companies to charge the cost of supplied power with progressive rates in relation to the higher amounts of total power within a given demand period, and also in relation to the highest level ofpower reached within the demand period. The rate based on the amount of power is an incentive for the user to maximize the consump tion duringfthe period, thereby to help improve the utilization of the generating plants and the power transmission systems. The progressive rate on the total demand accounts for the increased facilities provided by the power company to meet the user's demand and for the capital costs involved.

It is known from an article entitled Electric Demand Can Be Controlled published in Power, November 1970, pages 58, 59 by Norman Peach, to use a digital computer controlsystem in order to instantaneously determine within a demand period the trend of power consumption, to forecast the total amount of power at the endof the period and to' either add or shed the loads of a plant so as to be able to keep the anticipated demand as close as possible to a predetermined demand limit. While such a control system, or method,

provides for a more economicaluse of the power available from a power supply utility company without exceeding the total amount of KWH permissible at a given rate during the demand period, the prior art control system, and method, do not take into account the constraints imposed by the customers industrial plant on the use of the loads.

It is an object of the present invention to effect demand control withincreased accuracy, thereby to insure all the economic advantages which can be gained power demand through anticipation of the power demand with a minimum of control operations.

It is still an object of the present invention to control a power demand in relation to anticipated demand and concurrently in relation to simulated load conditions.

SUMMARY OF THE INVENTION Briefly, the present invention provides for an improved power demand control system and method for maximizing a customers power demand rate throughout a finite demand period without exceeding a predetermined demand limit of energy at the end of the period.

A control system is provided for regulating the consumption of power supplied by a power supply system to an industrial load system having a base load and a plurality of interruptible loads and including loads having controllable and non-controllable status. The control system is responsive to time pulses derived from the power supply company meter for equal increments of energy thereby to continuously sample the power consumption. On this basis, the control system computes the anticipated final energy demand which it compares with the desirable demand limit to derive a demand error. ln response to the demand error the control system adds or sheds loads selected in accordance with a predetermined priority schedule. The seby running a load system with as high a load factor as lected loads are controlled to be shed or added against a background of non-controllable loads.

' A deadband is introduced during at least a portion of the demand period, and such deadband is made variable under certain conditions, in particular to ease the switching of larger loads.

Thecontrol system is operated during a portion of the demand period with a bias relative to the demand limit, and such bias is progressively reduced to zero during another portion of the demand period ending therewith.

Simulation can be used in order to ascertain the effects of control under the established priority and constraints, and such simulation can be used concurrently with actual control to improve decision making and update the information used for decision making, to increase the margin of control or permit emergency measures to be taken under anticipated adverse conditions.

The present invention can be used for control of the consumption of the energy supplied by a power supply company, such as electricity, gas, or like energy. The control system will be described hereinafter in the context of the consumption of electricity from an electrical company.

The loads supplied with energy may be of several types:

a. Lighting and space heating loads which are normally relatively constant and usually part of the base load.

b. Loads which are either ON or OFF with short run up times and reasonable starting curves.

0. Loads with their own ON/OFF controller. Examples of these are air or ammonia compressors, air conditioners, etc.

d. Loads with extended run-up times and large starting currents. Y

e. Large loads of short duration and relatively infrequent occurrence (e.g., test loads).

f. Arc furnaces and similar industrial process equipment where production penalties are paid for increased shut-down period. Safety requirements need also to be observed (e.g., toxicity of atmosphere).

Most of these loads have established constraints which must be respected when attempting to control separately or concurrently several kinds of loads to limit the power demand.

BRIEF DESCRIPTION OF THE DRAWINGS senting the correlation between KW and KWH consumed during a demand period for three different time distributions of power consumption for the same total 2 of KWH.

FIG. 5 illustrates diagrammatically the principle of calculation of the demand error used in the control system according to the present invention.

FIG. 6 is a diagram showing a strategy of control used in the control system according to the present invention.

FIG. 7 represents control between boundaries in the early part of the demand period irrespective of the de mand limit.

FIG. 8 illustrates control on either side of the mean trajectory in relation to two parallel boundaries.

FIG. 9 differs from FIG. 8 in that the two boundaries are covergingtoward the demand limit at the end of the period.

FIG. 10 illustrates a particular strategy ofv control in accordance with the present invention.

FIG. 11 is an overview of the control system according to the present invention.

FIG. 12 is aflow chart explaining the operation of the Process Interrupt Handler. which is part of the control system according to the present invention.

FIGS. 13A, 13B and 13C show an illustrative logic flow chart of a program according to the present invention.

FIGS. 14A and 148 show an illustrative logic flow chart of a simulation program that can be used with the control system according to the present invention.

To be in the context of the present invention it will be hereinafter assumed that the power demand results from a plurality of loads which at least in part can only be switched ON or OFF under constraints existing either at all times or occurring at least at the instant of control. However, by ON and OFF, it is understood that the loads, if electrical, need not be switched by electrical connecting or disconnecting. A power consumption can be increased or decreased by mechanical connection or disconnection of the load as well, such as by means of a clutch or valve actuation.

When several loads are available for being switched ON or OFF, to apply the strategies of the prior art just discussed, there is an ambiguity as to response that can be made for proper control, for example, at times a load switched off bythe demand controller may already be off. The particular load to be switched on by the demand controller might have been previously put out of service. It is also possible that control of the demand be prevented by an overriding'and external control equipment associated with the load, as is usual with air conditioners, chillers, or air compressors, for instance. Other types of constraints can be found in the particular industrial plant of a customer to a power company, and are within the scope of application of the present invention.

The invention provides for a judicial selection of the loads in order to respect these constraints by eliminating the priorities set among theloads which are found to be in violation of the existing or anticipated constraints. Thus the priorities are not only determined by a predetermined classification of the loads, they are also changed in the course of the control process in order to take into account the history of the loads as it appears from a reappraisal of the availability to be switched ON, or OFF, during the demand limit control process.

The selection of a load not only depends upon the overall status of the different loads, but also upon the behavior of any particular load in the users plant. The control system according to the present invention, therefore provides for a dynamic allocation of priorities for the selection'of the loads to be controlled at any particular time.

. The invention also provides for. relative control, rather than an absolute control of the loads, any selected and controlled load change being effected independently from the base load and from non-controlled loads.

The control system also takes into account the established constraints. For instance, besides interruptible loads which can be selected to be shed or to be added,

there may be in the plant loads having a noncontrollable status, which otherwise could defeat the control system. However, the control system according to the present invention limits its own capability of switching loads in order to accept the non-controllable loads as a favorable factor of correction in the demand limit control process. In particular, the control system according to the invention makes use ofa deadband to this effect.

The invention moreover calls for the'determination of the constraints either off-line or on-line in order to be able to ascertain with improved accuracy the anticipated effect of control and prepare for the right decision in selecting the loads to be'controlled at a given instant or for an emergency action by the present control operation. To this effect a special technique of simulation is provided on the basis of actual load behavior in the users plant, andsuch technique of simulation is used either as an off-line information providing system to be used preparatory to running of the control system according to the invention, or as an on-line coordinated helper system for constantly revising predictions and updating data during control of the loads in real time.

Finally the invention provides for a control system in which the technique of shedding loads or adding loads to limit the total power demand as desired at the end of any given demand period is modified in order to maximize the needs for particular loads of the user by minimizing the effect of control of the plants constraints. To this effect, control is not necessarily ex- P iS+B) S iaaabaadjaama the use vector'li mits within which no switching (on or off) of load is effected. In order to allow switching of larger loads when they are selected under the assigned priorities, the control system pro- Target l Vides' 'raravaaaare deadbandjradditio afaterfiissrsry target below the objective is imposed for control until a certain time limit relatively close to the end of the demand period and when such limit has'been reached the bias so established is progressively reduced to zero until the end of the demand period, at which time the demand limit is substantially achieved.

General Description Of The Limitation Of Power Demand By Control Of Interruptible Loads F orecastingof the trend toward .a total demand at the end of a given billing periodis based on the following considerations:

A common form of presenting graphically the variations in power-(KW) versus time .isshown on "FIG. 1 for a demand period of 15 minutes. This diagram is based Slope power ('KWl-I)/60 If nothing would change among the loads. the trajectory from point M would follow MW, until a point W where it intercepts the IS minutes ordinate, thus below the demand limit C.

Referring again to FIG. l,the energy curve is shown with the KWH plotted against time during a givendemand period. The slope of the curves plotted on this diagram represent power in KW. In this case the base load (non-interruptible) has a slope a. The sum of the base and the switchable loads has a slope B. In order that a control opportunity exist, the slope must at some time be greater than the slope of the mean AC. The possibility of control should first be examined under the assumption of a single load to be switched ON or OFF. The boundaries of acceptable trajectories to meet the requirements with a single load are given by lines ABC and ADC, and there is an infinite number of possible intermediary trajectories, such as a, b, c, d, within this envelope. Of course, interception of the 15 minute ordinate between C and E would respect the Demand Limit requirement but would provide a poor load factor. In the absence of any other consideration all of the trajectories have equal economic merit so far as the mere purchase of electrical energy is concerned. The

minimum requirement is that a KW B, since the power in KW is for a given point M on the trajectory, the slope from that point.

A trajectory which would give a uniform reduction in power from the maximum (Qflillq therninirnum B would have a power P, versus time relationship such that:

It wits'saagts'lsii ta max whereinz is 15 minutes, S the niaximum power ofall switchable loads ON and B the power of the base load. It can be shown that when a point M follows one of the trajectories of FIG. 1, in general:

[f P dt P,

Other continuous relationships between P, and [are possible.

However, the power factor is a further requirement as can be seen from FIGS. 2A, 2B, 3A, 38, 4A and 4B.

For instance, an industrial load system may have a base load B comprised of a number of small loads such as lighting, small meters, etc., and a total switchable-load S consisting of a number ofsmaller loads. FIGS. 2 .to 4 representthree different load distributions which could be obtained underthe same maximum demand but with three different load factors. Three different trajectories can be found on FIG. 1 which would correspond to these three different distributions of power. FIG. 2A shows apower Pl maintained up to time t, and a lower power P2 maintained from time t, to the end of the demand period. FIG. 3A shows a power P2 maintained from initial time 0 to an instant and a higher power Pl consumed between time I and a later time t the power P2 being again supplied from time t during the remaining portion of the demand period. FIG. 4A is similar to FIG. 2A but with'an inverse distribution of the powers P1 and P2 before and after time I The trajectory to a common level of HWI-I at C is ABC for FIG. 2A, as shown by FIG. 2B, ABDC for FIG. 3A is shown in FIG. 3B and ABC for FIG. 4A as shown on FIG. 48. Since the power consumed is constant during each ofthe time intervals, the integrated power follows a demand curve which is linear, the slope being P1, or P2, depending upon the level of power maintained during the particular time interval.

FIG. 5- illustrates the principle of calculation of the error for any point M along the trajectory during a demand period of 15 minutes. A clock installed by the power supply company determines theinitial time of each demand period, or the final time of a preceding demand period). The watthour meter provides a KWI-I pulse which represent the magnitude of the power which has been consumed during a certain instant A 1 corresponding to a full rotation of the disc-of the meter, thus representing a constant increment or unit of energy (KWI-I). Thus, the A t intervalappearing along the time axis is essentially variable. This time interval is detected as a representation of the slope at point M and it represents the power P, in KW hour/- as is evident from the geometry of triangles MNC and MWC. Having determined Slope AP/60 by triangulation, and the sign of the error, depending upon whether the intersection point W is above or below the target C, control is effected by selectively adding or sheeding suitable loads in the plant. In order to more closely follow the target, a deadband is provided on either side of the trajectory by defining two angles and 9 which should not be exceeded. The headband will contain excessive control but will leave free control of the loads as long as the projected tangent'remains within two limits MU and MV (FIG. 5) so defined. In accordance with the present invention such deadband is made variable as will be explained later. The upper limit MU will represent the decrease vector and the lower limit MV of the deadband will represent the increase vector" for control.

Since in the early part of the. demand period the possibility of control greater than in the later part, a differential treatment of the load control during the period is beneficial. Referring to FIG. 6 from time 0 to time ti no control is effected. This allows for a maximum utilization of the loads in the plant at an early time in the period when all possibilities of control to meet the target T are available. After this first field, the

control system from time ti to time t provides control in a second field in accordance with the general principles explained hereabove with'reference to FIG. 5. Thus, at position M on the trajectory followed from time zero,'the slope of the tangent indicates at W that the loads as they stand would bring total power consumption under the target T by as much as TW. Improved control is obtained when the distance from the point to the target has a reduced slope. It has been suggested therefore to create abias relative to-the target either by having an offset at the beginning of the trajectory, or by lowering the targetsuch as at C on FIG. 6. This is the type of control achieved in the second field, e.g., between time ti and time t Therefore the control system is operative to calculate and correct an error from W to C rather than from W to T. When attempting to control the demand to correct the slope of MW by switching ON loads, there is a possibility that MW raises itself as far as to exceed the increase load vector MV The load will not be switched ON in such case. However, under the pressure imposed on the system by the non-controllable loads which may be switched ON nevertheless, it ispossible that the vector MW still reaches a slope above the temporary target C or even the desired demand limit T. In such case the control system is operative to switch OFF loads against the decrease load vector MU.

Assuming that at time t the trajectory reaches point M as shown on FIG. 6, there is still an error RC, although very small. At this instant the second field is terminated and a third field of control operation is es- Other strategies of control are possible. Instead of continuous control toward a target, a discontinuous strategy can be followed. For instance,'as shown in FIG. 7 the trajectory is first only restricted to the area bounded by OX, OY and ZZ which havebeen selected irrespective of the demand limit T. T becomes a permanent target once one of the boundaries ZZ and-YY, has been reached.

FIG. 8 illustrates another strategy for adding or shedding a load. It is seen here that control is effected so that the sum of the on-times is equal to the time necessary to reach B from A.

i min and once OFF, it willnot be able again unless Such a strategy can be implemented by setting up constraints YY and Z2 on either side of the mean curve AC, thedistance from the mean curve being chosen in order to'make the ON times and OFF times, and ON/- OFF ratios compatible with the slopes of the two load conditions. Particular care has to be exercised so that proper action is taken whenever the KWH curve intercepts BC. This is achieved by calculating the slope It of MC the line joining the point M on the trajectory to C, and switching OFF a load other than base load once a FIG. 9 shows an alternate strategy with pivoted limits. This strategy is taught in the US. Pat. No. 3,621,271 issued on Nov. 16, 1971 to Carl J. Snyder. While t X,- r is being observed, t, t,,,,-,, would not be, since the system would tend towards more freto be switched OFF quent switching at the end of the demand period in the case of a single switched load.

THE DEMAND CONTROL SYSTEM OPERATION Referring to FIG. 11 there is shown an overview of the control system 1 according to the present invention applied to the control of the loadsof a plant 2 supplied with electrical power on the power supply lines 3 of a power supply company 4.

The loads are classified in the four categories of l base load, II inhibited loads, III sheddable loads, and IV critical loads.

The base load represents equipment which is constantly present or at least, if the equipment is switched on and off, such occurrence has in its narrowness a sufficient pattern to equate to a fairly steady load. Therefore, the base load is by definition a non-sheddable load. If control of the base load is not possible, the base load affects'by its presence the control of the sheddable loads, since'it accounts for a portion of the KWl-l consumed at any given time. Typical of the base load are the lighting and heating loads, and also certain groups of motors and equipment.

An inhibited load is defined as a load which will be permitted to be switched ON during the first minute of any demand period but will be switched OFF after a certain duration has elapsed and will be inhibited from being switched on again until after the next demand period has begun. For these loads the control system needs to know the duration of ON time from the beginning of a given demand period, and at a given instant whether the load is available for use or not. If the load is available, it will be qualified'as permissive.

The sheddable loads are by definition the loads which may become available on a priority basis to be switched ON, or OFF, by the control system. This is a general quality of the loads which are not a base load provided they have not a non-controllable status. Thus, the constraints of the present industrial plant may limit such sheddability."

The present invention provides for selection and control of the loads within such constraints in order to maximize the utilization of the'power supplied and minimize the cost of the energy. Therefore, a sheddable load essentially is, within the concept of the invention, a load which can be switchedON or OFF during a certain demand period without affecting the operation of the plant. v

An important limitation in the control of an interruptible load is the ON time and the OFF time. It is not advisable tostart-up a load too often, for instance, for a motor this may have a damaging effect on the windings. Also electrical surges caused by starting, are costly. It might also be economically desirable not to leave an equipment off during an excessive time interval. When an excessive off time exists, such equipment must be switched on and another alternative has to be sought if the shedding of some load is the control action required atthat time. The ratiobetween ON time and OFF time may also introduce a limitation, requiring to keep ON a load.

One important consideration in the control system operation according to the invention is that while sheddable loads may be available for switching, it is possible to spread the ON times and OIFF times within a given demand period and between demand periods in order to spread wear.

The last category of load is the critical load. These are loads which are ON and OFF under external requirements at the plant. Forinstance the air conditioners and the compressors follow local conditions. Local control might override action by the control system. Switching ON or OFF of such loads although required by the demand control system, could be ineffective since the running time for such a load is not known in advance. For this type of load switching ON/OFF is constantly monitored.

Referring again to FIG. 11 the loads are controlled by a contact output unit 5, which is part of a process control computer system 6. The contact output unit does operate a plurality of load contact outputs 7, each of which closes the energizing circuit of a corresponding relay 8 to actuate the switching element 9 of a load. Such switchingelement may be the starter of an electrical motor, the plunger of the valve of acompressor,

etc.

When a load is in the switched ON condition, a corresponding status contact interrupt 10 is closed as shown on FIG. 11, with the contacts being arranged so as to correspond to the loads. There is shown in FIG. 11 two such groups of contacts with one group being associ ated with a diode l1 and one scan contact output C01, and the other group being associated with a diode 12 and another scan contact output C02. Respective diodes 13 are connected in circuit with corresponding status contact interrupts 10 to establish a circuit from a 48V source 20 provided by the computer system, to ground with the associated diode, 11 or 12. As shown on FIG. 11, concurrent closing of one scan contact output such as C02 and one particular status contact interrupt 10, such as shown on the Figure, permits identification by the interrupt unit 14 of the status of the particular contact as being one of Group 2 (C02 on the Figure).

In order to control the power demand by shedding or adding loads, the control system 1 is responsive to the power consumption continuously recorded by the meter 15 of the power supply company. The process control computer receives over a line 16 the KWH pulse which as a At. characterizes the consumption at any particular instant within the demand period. The power supply company also provides a clock 17 which determines the beginning and the end of each demand period. In the instant case it is assumed that each such demand period lasts 15 minutes. For eachturn of the disc of the meter 15 there is a pulse generated which will be hereinafter called KWH pulse." The succession of these pulses represent on a time scale the power consumed for one turn of the disc. The process control computer system 6 through the interrupt unit 14 assesses the status of the status contact interrupts l0, and more generally monitors all the input data fed into the computer system regarding the individual loads in the plant with their constraints, effectuates calculations, makes decisions, which are converted, after each of the above-mentioned KWH pulses, into whatever load control action is necessary through the controlled operated of the relays 8.

Included as part'of the control system 1, is the process control computer system 6. This computer system can be a digital computer system, such as a Prodac 2000 (P2000) sold by Westinghouse Electric Corporation. A descriptive book entitled Prodac 2000 Computers Systems Reference Manual has been published in 1970 by Westinghouse Electric Corporation and made available for the purpose of describing in greater detail this computer system and its operation. The input systems, associated with the computer processor are well known and include a conventional contact closure input system to effectuate scanning of the contacts or other signals representing the status of the equipment. Also operator controlled and other information input devices and systems are provided such as the teletypewriter 19 shown in FlG. 11. The contact closure output system is also conventional and part of the Prodac 2000 general purpose digital computer system sold.

Although FlG. 11 shows electrical loads which are sheddable or which can be picked up by the demand control system it should be understood that switching of an electrical load is not the only control action within the scope of the present invention. If it is found 11 not necessary or desirable to limit the demand by switch the actual electrical load on or off in every case,

. the same result can be obtained by other alternatives.

For instance, fan loads can be reduced to some 20% of normal by closing the inlet vanes or damper by means of a servomotor, rather than switching off the motor.

This operation could be performed relatively fre-- quently and for short periods (for example towards the end of a demand period as a fine trim), whereas there is a limited number of starts per' hour allowed for larger motors. When the load involves eddy current couplings or pneumatic clutches, the mechanical loads can be disconnected from their motors. Withair compressors having inletvalves, these may be held open by the pressure control equipment when the pressure is high. The control of compressors to maintain demand below the desired level would operate in parallel with the pressure control system with thesame goal. These alternatives avoid increasing the cost of maintenance of plant equipment.

The computer system used in the control system according to the invention includes both Hardware and Software. For instance the interruptunit 14 is associated with an interrupt handler. (50in FIG. 12). Software is being used as a convenient means of quickly and efficiently performing operations as required in monitoring data, doing calculations, making decisions and translating treatment of information into control action within the short time intervals determined by the recurrent transmission of KWH pulses from the power supply company meter 15.

which are successively handled by the process interrupt handler (see FIG. 12). One interrupt will receive the 48V DC pulse generated by the external clock and is used to reset the demand meter owned by the power company. This same pulse will reset the associated registers in the computer when itis received. Another interrupt will receive a train of 48V DC pulses transmitted by the'meter, 15, each pulse representing KWH (or KVAH) consumed. Another interrupt could be reserved fora second KWH meter if needed. Three other interrupts (the scan contact interrupts of FIG. 11) will receive a status which corresponds to the status of one load contact in the plant and belongs to one group of three associated with one scan contact output (C01, C02 on FIG. 11).

' The normal operator interface with the system will be via a teletypewriter 19. This device will also provide a log of system performance together with any other messages that may be required. Via the typewriter keyboard the operator will also be able to change the values of various constants relating to the system as a whole or to individual items of equipment. The time and data and onpeak and off-peak demand levels can also be changed using the same keyboard.

Having considered the Hardware aspect of the control system. according to the invention, consideration will now be given to the software components of the computer system referring in particular to the flowcharts of FIGS. 12, l3A,-13B, 13C, 14A and'14B. Referring to FIG. 12, the operation of the interrupt handler 50 of the computer system is described. This program will receive T (at step 51) an interrupt from the clock at the beginning of each demand period together with a KWH pulse (at step 60) from the'KWH (or KVAH) meter 15 for each revolution of the disc.

In response to a clock pulse, the decision at step 51 is a yes, and the data are transferred to a buffer. These data include time (step 52) the demand limit desired at the end of the demand period (coded as DEMLIN) which is set in the total kilowatt register (KWTOT). At step 53, the program puts data to be printed out for the preceding demand period.- The next step (55) is to clear all registers in which accumulated values are stored including time into period and KWHduring the period (time, number of pulses N, KWHIN, and KWHTOT registers). Prorated values of time and KWH are stored in those registers when the KWH pulse does not coincide with the clock pulse. The chain returns to the process interrupt handler 50.

If the interrupt relates to a contact status, as seen at step 56, the interrupt is stored at step 51 at the proper location to provide a status image .of the array of contact interrupts 10 (FIG. 11). The present contact output is reset and the nextcontact output is set in the status list (at step 58). At step 59 the contact output handler which corresponds to the contact output unit 5 (FIG. 11) is bid, andthe chain returns to the process interrupt handler 50. If the interrupt is the KWH pulse from the meter, as seen at step 60, this data is stored as real time in a KWH TIME registenFor each turn of the disc of the meter, e.g., for equal increments of energy, one KWH pulse is received. The count iseffected at step 62 (N N+, l), and whenever required, there is a bid for control at step 63. This chain returns also to the process interrupt handler 50. Besides the preceding interrupts which directly determine operation of the control system, there may beother interrupts received, as seen at step 64.-Such unscheduled interrupts cause at step 65 the printing of a warning message. and there is a return to the task scheduler of the computer system.

FIGS. 13A, 13B, 13C show a flowchart of the main control program, which is provided to explain the operation of the control system according to the present invention.

When control starts, DELTEE," e.g., the At between two successive KWH pulses, is determined by difference. Thisis step 160. Then a rotating tile is updated by adding the last of three successive vectors corresponding to three successive times t t 1 being 'for the latest At at step 161. At step 162, the present power consumption (IPWR) is computed from the rotating file, and'from the present status IPWR is translated at step 163 into the Past KWH TIME register. At step 162'the present power consumed is calculated by averaging for three successive points on the trajectory corresponding to times t where O.l a 0.4 and t, is in hours and k KWH/pulse.

pulse depends upon the speed of the disc rotation. It is necessary to. compute the total time into the demand period and the total energy consumed within the period. The first is obtained by integrating the DELTEES corresponding to all KWH pulses received during the period. The energy consumed is equal to the number of pulses multiplied by the meter factor (KWH/pulse). The decision at step 164 (since N is normally greater than I) is to go to step 167. where the demand period time is found to be the sum of the Ats in the period.

The DELTEE corresponding to the first pulse after the clock pulse (N=l) belongs in part to the last demand period and only in part to the new demand period. In such case, the decision at 164 is to go through steps 165 and 166 which provide a prorated value of the KWI-IIN in proportion to the fraction of DELTEE pertaining to the new demand period. Accordingly, step 165 provides the time difference between KWI-l Time and clock time, and at step 166 the prorated value KWI-IIN is computed.

Looking to A on FIG. 13A, the next step is to compute KWTOT, e.g., the energy consumed during the present demand period until the particular iteration, converted to equivalent power at the end ofthe period. KWTOT is equal to N (number of pulses) *KWH/pulse *Constant plus the fraction prorated at step 66, if there is one, e.g., KWHIN. Since computation is done with a floating point for increased accuracy, conversion to integer is effected as indicated by ITKWl-I IFIX (KWTOT) (168).

Then, at step I69 the system looks at the status of the ON times and OFF times ofthe loads, while adding the At (DELTEE) audit is determined at step 70 whether any load exceeds the OFF time assigned to it. In such case, a decision is made at 70 to set the contact output to switch the particular load ON (step 71) thereby not to violate the constraint. Since the load has been switched ON, the ON time of this particular load is set to zero (step 72). Also, the energy estimated to be consumed in the overall industrial load system (IPWR) must be updated in order to take into account the load so picked up. However, if the load exceeding its OFF time belongs to a class, or priority including several other loads in order to reduce wear, all the loads of the same class, or priority, are rotated. Rotation is effected at step 74..

The next decision is at 75 depending upon whether the system is under the first field previously mentioned, e.g., a first portion of the demand period for which no control is effected (NOC). When the first field terminates, the second field begins which is a field of control, namely at B after step 75. If in response to the decision 75 the control system operates in the no control condition (NOC), the system goes to 109. As a result, the contact output handler will ascertain the status of the contacts. Considering now the chain starting at B for control operation, the second and third fields of controls (from t, to t, and from t, to 15 minutes) should be explained again by reference to FIG. 6. C represents the BIAS in the second field of control, T the original target corresponding to the desired Demand Limit (DEMLIN). The target (ITGTI) in the second field is represented by C, e.g., DEMLIN-BIAS. The control system (FIG. 13B) is set accordingly at step 76. A decision is made at step 77 to choose between the second and third field of control depending upon whether the time in demand period has reached t (NFIN) or not.

If we are still in the second field, the flowchart goes from 77 directly to step 79. If the third field is required, at step 78, the BIAS is reduced at each iteration until the end of the period. Accordingly, a fraction is used to reduce the BIAS by a ratio between the time left in the period and the duration of the third field. This amounts to a displacement of the target for each point on the trajectory. At steps 79 and 80 the demand error is calculated. ITGTI represents the ordinate of the target (C in the second field, I in the third field, T at the end of the demand period). The ordinate of N (see FIG. 6) is ITKWH obtained at step 168. The ordinate of W is ITKWH ITEM (e.g., WN). Therefore, the error due to W being too low, or too high, relative to the target is Slope IGTI (ITKWH ITEM). First, at step 79 ITEM is calculated, using data obtained at step 162 (IPWR present power consumption), and computing the second term in equation (3), e.g., P, (T,,,,, t). Knowing ITKWH and ITEM, the demand error is calculated at step 80. Then the sign of the error Y or N at 81 will tell whether the projected point W lies above or below the target. If it is above,,the error is negative and loads have to be switched OFF. The flow chart goes to D. If point W lies below the error is positive and loads must be switched ON. The flow chart goes to C.

First, the situation when the error is positive will be considered, by taking the flow chart from C on, in order to find l whether there is a load to be switched ON, (2) whether a selected load can be switched ON by step 86.

The computer system then first looks for a load. Step 82 initializes a search for the least sheddable load.

In the table of priorities, the loads are classified from the least sheddable to the most sheddable (which can be understood as from the first to be switched ON to the last to be switched ON). In other words, the search goes from one end of the table when the search is to switch ON a load, and from the opposite end if the search is to switch OFF a load. (The last situation would be at D on the flow chart).

As a general consideration at this point (valid also for OFF switching at D) in a table can be stored or reserved in memory the following characteristics associated with each item of equipment to be of the switchable load type:

Equipment Identity No.

Power Consumed When Starting Starting Period Power Consumed When Running Group Priority Subgroup Priority Maximum Allowable Off Time Minimum On/Off Time Ratio Minimum Time Between Starts Availability For Use By The Demand Control System Address of Associated Contact Output Amount of Time Off since Being Switched Off Updated Each sec., or after Amount of Time On Since Being Switched On each KWH Pulse. The group priority is assigned by the user, the most sheddable loads being low numbers. Priority, or group, numbers increase with the importance of the load to the overall plant operation. The programs associated with this table will be called immediately after the switching decision subroutine, or once per second to 

1. In a control system for holding to a demand limit at the end of a billing period the power demand of an industrial plant having a plurality of interruptible loads, including means for providing an indication of power consumption of said loads during a billing period; means responsive to said means for providing an indication of power consumption for predicting a demand at the end of said billing period; means responsive to said demand predicting means for providing a demand error relative to said demand limit; means for selecting a suitable amount of power; comparator means responsive to said demand error providing means and to said power selecting means for establishing a residual error relative to said demand limit; and means responsive to the output of said comparator means for load control; the combination of: means for setting switching constraints to at least part of said loads thereby to define among said interruptible loads and at times during said billing period, loads of controllable status and loads of non-controllable status; said load control means including means for switching a load of a switchable amount of power in response to the sign of the output of said comparator means; means for indicating the switching status of said loads at anytime during said billing period; said power selecting means including priority means operative with a priority list of loads of controllable status and in accordance with the output of said switching status indicating means; said power selecting means being operative in response to said residual error during successive decision periods within said billing period to provide a switchable amount of power from said priority list; said switching means being operative in response to said power selecting means during such said decision period and operative in response to said constraint setting means before such said decision period; and, wherein said demand predicting means is responsive to operation of said constraint setting means before any such said decision period.
 2. The control system of claim 1 with means for establishing said residual error relative to a biased said demand limit, said comparator means being selectively operable relative to said demand limit and to said biased demand limit; wherein said comparator means and said switching means are operated relative to said biased demand limit during a first period within said billing period and wherein a predetermined priority load is selected by said priority means during a second period following said first period; with said comparator means and said switching means being operated relative to the unbiased said demand limit during said second period.
 3. The control system of claim 1 with means for preventing operation of said switching means during an initial period of said billing period; with means for establishing a bias to said demand limit during an inteRmediary period following said initial period; and with means for reducing said bias progressively to zero during a final period following said intermediary period and ending with said billing period. 